#pragma once
#include <iostream>
#include <string>

namespace test
{

template<class K>
struct hash
{
    size_t operator()(const K& key) const
    {
        return key;
    }
};

template<>
struct hash<std::string>
{
    size_t operator()(const std::string& s) const
    {
        size_t n = 0;
        for (auto c : s) n = n * 131 + c;
        return n;
    }
};

}